package com.ttmusic.comparator;


import java.util.Comparator;

import com.ttmusic.entity.MusicInfo;
import com.ttmusic.utils.baidu.Song;
import com.ttmusic.view.adapters.MusicAdapter;
import com.ttmusic.view.adapters.MusicAdapter.SortType;

/**
 * 在线搜索到的音乐实体比较器-用于排序
 * @author wuchangyong
 * 
 */
public class SearchSongComparator implements Comparator<Song> {
    @Override
    public int compare(Song lhs, Song rhs) {
    	//默认按歌曲名称排序
    	return lhs.getPinYinHeadCharofTitle().charAt(0) - rhs.getPinYinHeadCharofTitle().charAt(0);
    }
}
